﻿using Scrabble.Model;

namespace Scrabble.ViewModels
{
    public class Square
    {
        private readonly BoardViewModel _board;
        private readonly BoardLocation _location;

        public Square(BoardViewModel board, BoardLocation location, ScoringStyle scoringStyle)
        {
            _board = board;
            _location = location;

            ScoringStyle = scoringStyle;
        }

        public BoardLocation Location
        {
            get { return _location; }
        }

        public bool IsAtCenter
        {
            get { return _location == Board.CenterLocation; }
        }

        public ScoringStyle ScoringStyle
        {
            get; private set;
        }

        public void Select()
        {
            _board.SetStartOfPlayLocation(_location);
        }
    }
}